package org.nch.videoLauncher.domain;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: bill
 * Date: Dec 12, 2008
 * Time: 11:39:17 AM
 * To change this template use File | Settings | File Templates.
 */
public class Profile implements Comparable {

    private Integer id;
    private String name;
    private String baseVideoPath;
    private String urlCommand;
    private String vlcCommand;

    public Profile(){

    }

    public Profile(String name, String baseVideoPath){
        this.name = name;
        this.baseVideoPath = baseVideoPath;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBaseVideoPath() {
        return baseVideoPath;
    }

    public void setBaseVideoPath(String baseVideoPath) {
        this.baseVideoPath = baseVideoPath;
    }

    public String getUrlCommand() {
        return urlCommand;
    }

    public void setUrlCommand(String urlCommand) {
        this.urlCommand = urlCommand;
    }

    public String getVlcCommand() {
        return vlcCommand;
    }

    public void setVlcCommand(String vlcCommand) {
        this.vlcCommand = vlcCommand;
    }

    public Profile copy(){

        Profile newProfile = new Profile();
        newProfile.setName("Copy of - " + this.name + " - change this name");
        newProfile.setBaseVideoPath(this.baseVideoPath);

        return newProfile;
    }

    public int compareTo(Object o) {

        Profile pf = (Profile)o;
        if (this.id.intValue() == pf.getId().intValue()){
            return 0;
        }
        if (this.id.intValue() > pf.getId().intValue()){
            return 1;
        }
        if (this.id.intValue() < pf.getId().intValue()){
            return -1;
        }
        return 0;
    }
}
